package com.study.hot.di.dagger.dagger_in_android;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.study.hot.R;
import com.study.hot.di.dagger.dagger_in_android.model.Man;
import com.study.hot.di.dagger.dagger_in_android.model.Superman;

import javax.inject.Inject;

/**
 * <pre>
 *     author : slx
 *     time   : 2020/11/25
 *     desc   : Dagger在android中使用
 * </pre>
 */
public class DaggerMainActivity extends BaseActivity {

    @Inject
    Man man;

    @Inject
    Superman superman;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dagger_main);
        TextView tv = findViewById(R.id.tv_text);
        tv.setText("man test=" + man.test() + ",supername test=" + superman.test());
    }
}